.class Lcom/estrongs/android/taskmanager/bw;
.super Landroid/widget/BaseAdapter;


# instance fields
.field a:Z

.field public b:Z

.field c:I

.field d:Landroid/view/animation/Animation;

.field final synthetic e:Lcom/estrongs/android/taskmanager/HomeActivity;

.field private f:Landroid/view/LayoutInflater;


# direct methods
.method public constructor <init>(Lcom/estrongs/android/taskmanager/HomeActivity;Landroid/app/Activity;)V
    .locals 2

    const/4 v0, 0x0

    iput-object p1, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    iput-boolean v0, p0, Lcom/estrongs/android/taskmanager/bw;->a:Z

    iput-boolean v0, p0, Lcom/estrongs/android/taskmanager/bw;->b:Z

    const/4 v0, -0x1

    iput v0, p0, Lcom/estrongs/android/taskmanager/bw;->c:I

    invoke-static {p1}, Lcom/estrongs/android/taskmanager/HomeActivity;->a(Lcom/estrongs/android/taskmanager/HomeActivity;)Landroid/content/Context;

    move-result-object v0

    const v1, 0x7f040005

    invoke-static {v0, v1}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->d:Landroid/view/animation/Animation;

    const-string v0, "layout_inflater"

    invoke-virtual {p2, v0}, Landroid/app/Activity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    iput-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->f:Landroid/view/LayoutInflater;

    return-void
.end method


# virtual methods
.method public a()V
    .locals 1

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/estrongs/android/taskmanager/bw;->b:Z

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/bw;->notifyDataSetChanged()V

    return-void
.end method

.method public a(I)V
    .locals 1

    iget v0, p0, Lcom/estrongs/android/taskmanager/bw;->c:I

    if-eq v0, p1, :cond_0

    iput p1, p0, Lcom/estrongs/android/taskmanager/bw;->c:I

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/bw;->notifyDataSetChanged()V

    :cond_0
    return-void
.end method

.method public a(ILcom/estrongs/android/taskmanager/bx;)V
    .locals 1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/HomeActivity;->f(Lcom/estrongs/android/taskmanager/HomeActivity;)Ljava/util/LinkedList;

    move-result-object v0

    invoke-virtual {v0, p1, p2}, Ljava/util/LinkedList;->add(ILjava/lang/Object;)V

    return-void
.end method

.method public b(I)V
    .locals 1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/HomeActivity;->f(Lcom/estrongs/android/taskmanager/HomeActivity;)Ljava/util/LinkedList;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/util/LinkedList;->remove(I)Ljava/lang/Object;

    return-void
.end method

.method public b()Z
    .locals 1

    iget-boolean v0, p0, Lcom/estrongs/android/taskmanager/bw;->b:Z

    return v0
.end method

.method public c()V
    .locals 1

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/estrongs/android/taskmanager/bw;->b:Z

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/bw;->notifyDataSetChanged()V

    const/4 v0, -0x1

    iput v0, p0, Lcom/estrongs/android/taskmanager/bw;->c:I

    return-void
.end method

.method public d()V
    .locals 2

    const/4 v1, 0x1

    iput-boolean v1, p0, Lcom/estrongs/android/taskmanager/bw;->a:Z

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    iget-object v0, v0, Lcom/estrongs/android/taskmanager/HomeActivity;->f:Lcom/estrongs/android/taskmanager/GridViewInterceptor;

    invoke-virtual {v0, v1}, Lcom/estrongs/android/taskmanager/GridViewInterceptor;->a(Z)V

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/bw;->notifyDataSetChanged()V

    return-void
.end method

.method public e()V
    .locals 2

    const/4 v1, 0x0

    iput-boolean v1, p0, Lcom/estrongs/android/taskmanager/bw;->a:Z

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    iget-object v0, v0, Lcom/estrongs/android/taskmanager/HomeActivity;->f:Lcom/estrongs/android/taskmanager/GridViewInterceptor;

    invoke-virtual {v0, v1}, Lcom/estrongs/android/taskmanager/GridViewInterceptor;->a(Z)V

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/HomeActivity;->g(Lcom/estrongs/android/taskmanager/HomeActivity;)Lcom/estrongs/android/taskmanager/bw;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/android/taskmanager/bw;->b()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/HomeActivity;->g(Lcom/estrongs/android/taskmanager/HomeActivity;)Lcom/estrongs/android/taskmanager/bw;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/android/taskmanager/bw;->c()V

    :cond_0
    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/bw;->notifyDataSetChanged()V

    return-void
.end method

.method public f()Z
    .locals 1

    iget-boolean v0, p0, Lcom/estrongs/android/taskmanager/bw;->a:Z

    return v0
.end method

.method public g()V
    .locals 1

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/bw;->f()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/bw;->e()V

    :goto_0
    return-void

    :cond_0
    invoke-virtual {p0}, Lcom/estrongs/android/taskmanager/bw;->d()V

    goto :goto_0
.end method

.method public final getCount()I
    .locals 1

    iget-boolean v0, p0, Lcom/estrongs/android/taskmanager/bw;->a:Z

    if-eqz v0, :cond_0

    const/16 v0, 0xc

    :goto_0
    return v0

    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/HomeActivity;->c(Lcom/estrongs/android/taskmanager/HomeActivity;)I

    move-result v0

    goto :goto_0
.end method

.method public final getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/HomeActivity;->f(Lcom/estrongs/android/taskmanager/HomeActivity;)Ljava/util/LinkedList;

    move-result-object v0

    invoke-virtual {v0, p1}, Ljava/util/LinkedList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public final getItemId(I)J
    .locals 2

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 5

    const/4 v4, 0x4

    const/4 v2, 0x0

    if-nez p2, :cond_1

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->f:Landroid/view/LayoutInflater;

    const v1, 0x7f030017

    const/4 v3, 0x0

    invoke-virtual {v0, v1, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    new-instance v1, Lcom/estrongs/android/taskmanager/ca;

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-direct {v1, v0}, Lcom/estrongs/android/taskmanager/ca;-><init>(Lcom/estrongs/android/taskmanager/HomeActivity;)V

    const v0, 0x7f0900be

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/estrongs/android/taskmanager/ca;->a:Landroid/widget/ImageView;

    const v0, 0x7f0900bf

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/estrongs/android/taskmanager/ca;->b:Landroid/widget/TextView;

    invoke-virtual {p2, v1}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    :goto_0
    invoke-virtual {p2}, Landroid/view/View;->clearAnimation()V

    iget-object v0, v1, Lcom/estrongs/android/taskmanager/ca;->a:Landroid/widget/ImageView;

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    iget-object v0, v1, Lcom/estrongs/android/taskmanager/ca;->b:Landroid/widget/TextView;

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setVisibility(I)V

    iget-boolean v0, p0, Lcom/estrongs/android/taskmanager/bw;->a:Z

    if-nez v0, :cond_2

    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/HomeActivity;->c(Lcom/estrongs/android/taskmanager/HomeActivity;)I

    move-result v0

    add-int/lit8 v0, v0, -0x1

    if-ne p1, v0, :cond_2

    iget-object v0, v1, Lcom/estrongs/android/taskmanager/ca;->a:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v2}, Lcom/estrongs/android/taskmanager/HomeActivity;->d(Lcom/estrongs/android/taskmanager/HomeActivity;)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    iget-object v0, v1, Lcom/estrongs/android/taskmanager/ca;->b:Landroid/widget/TextView;

    const v1, 0x7f070086

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    :cond_0
    :goto_1
    return-object p2

    :cond_1
    invoke-virtual {p2, v2}, Landroid/view/View;->setVisibility(I)V

    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/estrongs/android/taskmanager/ca;

    move-object v1, v0

    goto :goto_0

    :cond_2
    const/16 v0, 0xb

    if-ne p1, v0, :cond_3

    iget-object v0, v1, Lcom/estrongs/android/taskmanager/ca;->a:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v2}, Lcom/estrongs/android/taskmanager/HomeActivity;->e(Lcom/estrongs/android/taskmanager/HomeActivity;)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    iget-object v0, v1, Lcom/estrongs/android/taskmanager/ca;->b:Landroid/widget/TextView;

    const v1, 0x7f070087

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    goto :goto_1

    :cond_3
    sget v0, Lcom/estrongs/android/taskmanager/HomeActivity;->b:I

    if-lt p1, v0, :cond_4

    invoke-virtual {p2, v4}, Landroid/view/View;->setVisibility(I)V

    goto :goto_1

    :cond_4
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/HomeActivity;->f(Lcom/estrongs/android/taskmanager/HomeActivity;)Ljava/util/LinkedList;

    move-result-object v3

    iget-boolean v0, p0, Lcom/estrongs/android/taskmanager/bw;->a:Z

    if-eqz v0, :cond_6

    move v0, v2

    :goto_2
    add-int/2addr v0, p1

    invoke-virtual {v3, v0}, Ljava/util/LinkedList;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/estrongs/android/taskmanager/bx;

    if-eqz v0, :cond_0

    iget-boolean v2, p0, Lcom/estrongs/android/taskmanager/bw;->b:Z

    if-eqz v2, :cond_5

    iget v2, p0, Lcom/estrongs/android/taskmanager/bw;->c:I

    if-ne v2, p1, :cond_7

    iget-object v2, p0, Lcom/estrongs/android/taskmanager/bw;->d:Landroid/view/animation/Animation;

    invoke-virtual {p2, v2}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V

    iget-object v2, v1, Lcom/estrongs/android/taskmanager/ca;->a:Landroid/widget/ImageView;

    invoke-virtual {v2, v4}, Landroid/widget/ImageView;->setVisibility(I)V

    iget-object v2, v1, Lcom/estrongs/android/taskmanager/ca;->b:Landroid/widget/TextView;

    invoke-virtual {v2, v4}, Landroid/widget/TextView;->setVisibility(I)V

    :cond_5
    :goto_3
    iget-object v2, v1, Lcom/estrongs/android/taskmanager/ca;->a:Landroid/widget/ImageView;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/bx;->a(Lcom/estrongs/android/taskmanager/bx;)Landroid/graphics/drawable/Drawable;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    iget-object v1, v1, Lcom/estrongs/android/taskmanager/ca;->b:Landroid/widget/TextView;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/bx;->b(Lcom/estrongs/android/taskmanager/bx;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1

    :cond_6
    iget-object v0, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v0}, Lcom/estrongs/android/taskmanager/HomeActivity;->f(Lcom/estrongs/android/taskmanager/HomeActivity;)Ljava/util/LinkedList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/LinkedList;->size()I

    move-result v0

    iget-object v2, p0, Lcom/estrongs/android/taskmanager/bw;->e:Lcom/estrongs/android/taskmanager/HomeActivity;

    invoke-static {v2}, Lcom/estrongs/android/taskmanager/HomeActivity;->c(Lcom/estrongs/android/taskmanager/HomeActivity;)I

    move-result v2

    sub-int/2addr v0, v2

    add-int/lit8 v0, v0, 0x1

    goto :goto_2

    :cond_7
    iget-object v2, p0, Lcom/estrongs/android/taskmanager/bw;->d:Landroid/view/animation/Animation;

    invoke-virtual {p2, v2}, Landroid/view/View;->startAnimation(Landroid/view/animation/Animation;)V

    goto :goto_3
.end method
